package br.trainee.web.dao.impl;

import javax.annotation.Resource;
import javax.enterprise.context.RequestScoped;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.transaction.UserTransaction;

import br.trainee.web.dao.service.IUsuarioDAO;
import br.trainee.web.vo.UsuarioVO;

@RequestScoped
public class UsuarioDAOImpl extends EntityDAOImpl<UsuarioVO, Long> implements IUsuarioDAO{
	
	@PersistenceContext(unitName="WebJsf")
	private EntityManager em;
	
	@Resource
	private UserTransaction userTransaction;
	
	public UsuarioDAOImpl(Class<UsuarioVO> classeObjeto) {
		
		super(UsuarioVO.class);
	}


	@Override
	public EntityManager getEntityManager() {
		
		return this.em;
	}



	@Override
	public UserTransaction getUserTransaction() {
	
		return this.userTransaction;
	}


	@Override
	public UsuarioVO verificaUsuarioLogado(UsuarioVO usuarioEntrada) {
		
		return null;
	}

}
